﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="QuestionEdit.aspx.cs" Inherits="Web.QuestionEdit" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<HTML>
	<HEAD>
	<title></title>
    <base target="_self" />
	<meta content="ie=7" http-equiv="x-ua-compatible">
	<script src="Scripts/jquery-1.7.min.js" type="text/javascript"></script>
	<link href="Styles/validate.css" rel="stylesheet" type="text/css">
	<script type="text/javascript" src="Scripts/easy_validator.pack.js"></script>
	<LINK rel="stylesheet" href="Styles/Style01.css">
	<script LANGUAGE="JavaScript">
	    $(function () {
	        $("[reg]").parents("td").prev().append("<font color='#ff0000'>*</font>");
	        $("textarea").each(function () { this.style.height = this.scrollHeight + 16 + 'px'; });
	        $("textarea").keydown(function () { this.style.height = this.scrollHeight + 16 + 'px'; });
	        $("#btnSave").click(function () { return formValidate(); });
	        $("#btnSubmit").click(function () { return formValidate(); });
	    });
	    function formValidate() {
	        var isSubmit = true;
	        $("form").find("[reg],[url]:not([reg])").each(function () {
	            if (!validate($(this), this.tagName)) {
	                isSubmit = false;
	            }
	        });
	        if (!isSubmit) {
	            alert("请确认'红字或红框'处的输入正确!");
	            return false;
	        }
	        return true;
	    }
	</script>
	<style>
		h3,h4{margin:0;padding:0;margin-top:3px;}
	    TEXTAREA { OVERFLOW-Y: hidden;}
	    TABLE.s1 TD { PADDING-BOTTOM: 0px; PADDING-LEFT: 1px; PADDING-RIGHT: 1px; HEIGHT: 24px; PADDING-TOP: 0px }
	    INPUT[type=text],textarea { WIDTH: 100%; MARGIN-LEFT: -1px;color:#0099cb; }
	    em{float:left;}
	    .spec{background:#eee;font-weight:bolder;}
	</style>
	</HEAD>
	<body>
		<form id="Form1" method="post" runat="server">
			<table class="s1">
				<tr><td width="30%">试题类型:</td><td>
                <select id="QuestionType" runat="server" title="不能为空!" reg=".">
                    <option value=""></option>
                    <option value="判断题">判断题</option>
                    <option value="单项选择题">单项选择题</option>
                    <option value="不定项选择题">不定项选择题</option>
                    <option value="投票题">投票题</option>
                </select>
                </td></tr>
				<tr><td>问题:</td><td><input id="Question" runat="server" title="不能为空!" reg="." /></td></tr>
				<tr><td>选项:</td><td></td></tr>
				<tr><td colspan=2><textarea id="Options" runat="server"></textarea></td></tr>
				<tr><td>答案:</td><td><input id="Answer" runat="server"/></td></tr>
			</table>
            <div style="text-align:right;margin-right:24px;margin-top:6px;">
                <asp:button runat="server" class=btn text="保存" id="btnSave" onclick="btnSave_Click"/>
                <input type=button class=btn value="关闭" onclick="window.close();" />
            </div>
		</form>
	</body>
</HTML>